﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Phone_Client.Commands_Utils;

namespace Phone_Client.ViewModels
{
    public class HomePageFeedDetailsVM : IViewModelBase
    {
        #region Fields

        private String _title, _category, _date, _author, _link, _resume;
        
        #endregion

        #region Properties

        public String Title
        {
            get { return _title; }
            set
            {
                if (_title == value) return;
                _title = value;
                RaisePropertyChanged("Title");
            }
        }

        public String Category 
        {
            get { return _category; }
            set
            {
                if (_category == value) return;
                _category = value;
                RaisePropertyChanged("Category");
            }
        }

        public String Date
        {
            get { return _date; }
            set
            {
                if (_date == value) return;
                _date = value;
                RaisePropertyChanged("Date");
            }
        }

        public String Author
        {
            get { return _author; }
            set
            {
                if (_author == value) return;
                _author = value;
                RaisePropertyChanged("Author");
            }
        }

        public String Link
        {
            get { return _link; }
            set
            {
                if (_link == value) return;
                _link = value;
                RaisePropertyChanged("Link");
            }
        }

        public String Resume
        {
            get { return _resume; }
            set
            {
                if (_resume == value) return;
                _resume = value;
                RaisePropertyChanged("Resume");
            }
        }

        #endregion

        #region Commands

        #endregion

        #region Commands Functions

        #endregion

        #region Functions

        #endregion

        #region Ctor

        public HomePageFeedDetailsVM(String title, String category, String date, String author, String link, String resume)
        {
            if (!String.IsNullOrWhiteSpace(title) &&
                !String.IsNullOrWhiteSpace(category) &&
                !String.IsNullOrWhiteSpace(date) &&
                !String.IsNullOrWhiteSpace(author) &&
                !String.IsNullOrWhiteSpace(link) &&
                !String.IsNullOrWhiteSpace(resume))
            {
                _title = title;
                _category = category;
                _date = date;
                _author = author;
                _link = link;
                _resume = resume;
            }
        }
        
        #endregion
    }
}
